﻿#include "stdafx.h"
#include "Grade.h"
#include <string>
#include <iostream>
using namespace std;
Grade::Grade()
{
}

Grade::Grade(const std::string &gid,double o, double f, double t)
{
	gradeId = gid;
	ordinary = o;
	gfinal = f;
	total = t;
}
std::string Grade::getGradeId()
{
	return gradeId;
}

void Grade::setGradeId(const std::string & i)
{
	gradeId = i;
}
double Grade::getGfinal()
{
	return gfinal;
}
void Grade::setGfinal(double g)
{
	gfinal = g;
}

double Grade::getOrdinary()
{
	return ordinary;
}
void Grade::setOrdinary(double o)
{
	ordinary = o;
}

double Grade::getTotal()
{
	return total;
}
void Grade::setTotal(double t)
{
	total = t;
}
void Grade::show()
{
	cout << "成绩--id:" << gradeId << ", 平时分：" << ordinary << ", 期末分：" << gfinal << ", 总评分：" << total << endl;
}
Grade::~Grade()
{
}
